<template>
  <!-- <div class="article-item">文章列表项</div> -->
  <van-cell class="article-item"
    :to="{
      name: 'article',
      params: {
        articleId: article._id
      }
    }" >
    <div slot="title" class="title van-multi-ellipsis--l3">{{ article.title }}</div>
    <div slot="label">
      <div class="label-wrap">
        <span>{{ article.createDate | formattingTime }}</span>
        <span>{{ article.content }}</span>
      </div>
    </div>
    <van-image
      v-if="article.uploader"
      class="right-cover"
      fit="cover"
      :src="article.uploader"
    />
  </van-cell>
</template>

<script>
export default {
  components: {},
  props: {
    article: {
      type: Object,
      required: true
    }
  },
  data () {
    return {}
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {}
}
</script>

<style scoped lang="less">
.article-item {
  .title {
    font-size: 16px;
    color: #3a3a3a;
  }
  /deep/ .van-cell__value {
    flex: unset;
    width: 116px;
    height: 73px;
    margin-left: 12px;
  }
  .right-cover {
    width: 116px;
    height: 73px;
  }

  .label-wrap {
    font-size: 11px;
    color: #b4b4b4;
    height: 50px;
    overflow: hidden;
  }
  .label-wrap span {
    margin-right: 12px;
  }
}
</style>
